#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QTcpSocket>
#include <QTextStream>
#include <QMessageBox>
#include <QUdpSocket>
#include <QHostAddress>
#include <QDebug>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonArray>

#include <QCoreApplication>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>


#include <QListWidget>
#include <QApplication>
#include <QListWidgetItem>

#include <QFileDialog>
#include <QFileInfo>
#include <QFile>

struct myaddr
{
    QHostAddress myhost;
    quint16 myport;
    QString myname;
};

namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();

private:
    Ui::Dialog *ui;
    QTcpSocket *tcp_socket;
    QUdpSocket *udp_socket;


private slots:
    void btnUDP_ConnectSlot();
    void searchDeviceSlot();
    void btnTCP_ConnectSlot();
    void listWidget_Clicked(QListWidgetItem *item);
    void SendOneSlot();
    void ReceiveOneSlot();
};


#endif // DIALOG_H
